$.fn.gdParallax = function(){
	
	function initiate(){
		$('body').on('mousemove',function(e){
			var mouseX = Math.round((e.pageX/$(window).width())*100);
			var mouseY = e.pageY;
			
			/*if($('.parallax').css('left') < mouseX){
				//console.log('less');
			}else {
				//console.log('more');
			}*/			
			var multiplySpeed =1;
			
			$('.parallax').each(function(){
			
				if($(this).data('left') != undefined){
					$(this).css({
						left: $(this).data('left') + ( -(mouseX / 100)  * multiplySpeed * $(this).data('speed')) + '%'
					})
				} else if($(this).data('right') != undefined){
					$(this).css({
						right: $(this).data('right') + ( -(mouseX / 100)  * multiplySpeed * $(this).data('speed') ) + '%'
					})
				}
			})
			
			
			//console.log((mouseX / 100) * 2);
		})
	}
	initiate();
}